---
### Cluster issuer, which is only suitable for creating CA or non-trusted certificates
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: selfsigned-no-trust
  {{- include "helm_lib_module_labels" (list . (dict "app" "cert-manager")) | nindent 2 }}
spec:
  selfSigned: {}
---
### Cluster issuer that uses the specified CA to issue certificates
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: selfsigned
  {{- include "helm_lib_module_labels" (list . (dict "app" "cert-manager")) | nindent 2 }}
spec:
  ca:
    secretName: selfsigned-ca-key-pair
---
apiVersion: v1
kind: Secret
metadata:
  name: selfsigned-ca-key-pair
  namespace: d8-cert-manager
  {{- include "helm_lib_module_labels" (list . (dict "app" "cert-manager")) | nindent 2 }}
data:
  tls.crt: {{ .Values.certManager.internal.selfSignedCA.cert | b64enc }}
  tls.key: {{ .Values.certManager.internal.selfSignedCA.key | b64enc }}
